/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Engine2D.graphics;

import org.lwjgl.opengl.GL11;

/**
 *
 * @author Garys
 */
public class GLColour {
    
    /**
     * 
     */
    public static final GLColour WHITE = new GLColour(1.0f, 1.0f, 1.0f, 1.0f);
    /**
     * 
     */
    public static final GLColour BLACK = new GLColour(0.0f, 0.0f, 0.0f, 1.0f);
    /**
     * 
     */
    public static final GLColour RED = new GLColour(1.0f, 0.0f, 0.0f, 1.0f);
    /**
     * 
     */
    public static final GLColour GREEN = new GLColour(0.0f, 1.0f, 0.0f, 1.0f);
    /**
     * 
     */
    public static final GLColour BLUE = new GLColour(0.0f, 0.0f, 1.0f, 1.0f);
    
    
    private float red;
    private float green;
    private float blue;
    private float alpha;

    /**
     * 
     * @param red
     * @param green
     * @param blue
     * @param alpha
     */
    public GLColour(float red, float green, float blue, float alpha) {
        this.red = red;
        this.green = green;
        this.blue = blue;
        this.alpha = alpha;
    }

    /**
     * 
     */
    public void set() {
        GL11.glColor4f(red, green, blue, alpha);
    }

    /**
     * 
     */
    public void reset() {
        GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
    }
    
    /**
     * 
     * @return
     */
    public float getRed() {
        return red;
    }
    
    /**
     * 
     * @return
     */
    public float getGreen() {
        return green;
    }
    
    /**
     * 
     * @return
     */
    public float getBlue() {
        return blue;
    }
    
    /**
     * 
     * @return
     */
    public float getAlpha() {
        return alpha;
    }
    
    /**
     * 
     * @param alpha
     */
    public void setAlpha(float alpha) {
        this.alpha = alpha;
    }

    /**
     * 
     * @param red
     * @param green
     * @param blue
     * @param alpha
     */
    public void set(float red, float green, float blue, float alpha) {
        this.red = red;
        this.green = green;
        this.blue = blue;
        this.alpha = alpha;
    }


}
